<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>开发者原创声明提交页面</title>
    <link rel="stylesheet" href="../layui/css/layui.css">
    <style>

   body {
      background-color: #f0f0f0; /* 可以设置一个背景颜色以替代背景图片 */
      margin: 0;
      padding: 0;
    }
    .header {
      margin: 20px;
      font-size: 48px;
      font-weight: bold;
      text-align: left;
    }
    .container {
      justify-content: center; /* 使内容居中 */
      align-items: center;
      padding: 20px;
      background-color: #fff; /* 设置背景颜色 */
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
      border-radius: 10px; /* 添加圆角 */
      max-width: '95%'; /* 根据需要调整最大宽度 */
      margin: 0 auto; /* 使容器居中 */
    }
    .footer {
      position: fixed;
      bottom: 0;
      width: 100%;
      background-color: #333;
      color: #fff;
      text-align: center;
      padding: 10px 0;
      font-size: 14px;
    }
    .myBtn {
      width: 15rem;
      height: 3rem;
      font-size: 1.3rem;
      margin: 1.2rem 0;
      border-radius: 2rem;
    }
    .myBtn, .myBtn:active, .myBtn:focus, .myBtn:hover {
      color: #fff;
      background: linear-gradient(90deg, #87CEEB, #B0E0E6);  /* 浅蓝色渐变 */
    }
  </style>
</head>
<body>
    <div class="header"><a href="https://atomgit.com/">AtomGit</a></div>
    <div class="layui-container container">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <h2 style="font-size: 56px; font-weight: bold;">开发者原创声明</h2>
            </div>
            <div class="layui-col-md12">
                <h2 style="font-size: 1.8rem; font-weight: bold;">Developer Certificate of Origin</h2>
                <h2 style="font-size: 1.8rem; font-weight: bold;">开发者原创声明</h2>
                <p><strong>Version 1.1</strong></p>
                <p><strong>第1.1版</strong></p>
                <br>
                <p>Copyright (C) 2004, 2006 The Linux Foundation and its contributors.</p>
                <p>版权所有(C)2004,2006 Linux基金会及其贡献者。</p>
                <p>1 Letterman Drive</p>
                <p>莱特曼大道1号</p>
                <p>Suite D4700</p>
                <p>D4700室</p>
                <p>San Francisco, CA, 94129</p>
                <p>加利福尼亚州旧金山市94129</p>
                <br>
                <p>Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.</p>
                <p>任何人均可复制和分发本许可文件副本，但不得修改。</p>
                <br>
                <hr style="border: none; border-top: 1px dashed #ccc; margin: 20px 0;">
                <h3 style="font-size: 1.6rem; font-weight: bold;">Developer's Certificate of Origin 1.1</h3>
                <h3 style="font-size: 1.6rem; font-weight: bold;">开发者原创声明（第1.1版）</h3>
                <br>
                <p>By making a contribution to this project, I certify that:</p>
                <p>在向本项目提交贡献之时，本人声明：</p>
                <br>
                <p>(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or</p>
                <p>(a) 该贡献全部或部分由本人创作，且本人有权根据当前文件中所示的开源许可证提交；或</p>
                <br>
                <p>(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or</p>
                <p>(b) 尽本人所知，该贡献所基于的在先作品已经过适当的开源许可证授权，且根据该开源许可证，本人有权在相同开源许可证（如当前文件中所示）下提交该修改后的作品（除非本人被允许根据不同的许可证提交），不论其是否全部或部分由本人创作；或</p>
                <br>
                <p>(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.</p>
                <p>(c) 该贡献是由作出(a)、(b) 或(c) 声明的其他人直接提供给本人，且本人未对其进行修改。</p>
                <br>
                <p>(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.</p>
                <p>(d) 本人理解并同意，本项目及贡献是公开的，且贡献（包括本人随附提交的全部个人信息，含本人签字）将被无限期存档，并可以与本项目或所涉开源许可证保持一致的情形下再被分发。</p>
                <br>
                <hr style="border: none; border-top: 1px dashed #ccc; margin: 20px 0;">
                <p>Above Chinese version of the Developer's Certificate of Origin is translated by the OpenAtom Foundation.</p>
                <p>以上开发者原创声明中文版本由开放原子开源基金会翻译。</p>
                <br>
            </div>

            <div class="layui-col-md12">
                <form class="layui-form" action="">
                    <div class="layui-form-item">
                        <label class="layui-form-label">姓名</label>
                        <div class="layui-input-block">
                            <input type="text" name="name" required lay-verify="required" placeholder="请输入姓名" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">邮箱</label>
                        <div class="layui-input-block">
                            <input type="email" name="email" required lay-verify="email" placeholder="请输入邮箱" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="checkbox" name="agree"  required lay-verify="required" autocomplete="off" title="本人已阅读并理解以上开发者原创声明内容及适用的隐私政策，本人同意签署并遵守该声明" >
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn myBtn" lay-submit lay-filter="formDemo">我同意签署</button>
                        </div>
                    </div>
                </form>
            </div>
           
        </div>
    </div>
    <div class="footer" style="text-align: center;">
        <p>XXXX版权所有 | 京ICP备XXXX号 | Copyright © 2024 ATOMGIT FOUNDATION. All rights reserved.</p>
    </div>

    <script src="../layui/layui.js"></script>
    <script>
        layui.use(['form','jquery','layer'], function(){
            var form = layui.form;
            form.render();
            // 监听提交
            form.on('submit(formDemo)', function(data){
                console.log(data.field);
                var $ = layui.jquery; // 引入jQuery模块
                var layer = layui.layer; // 引入layer模块

                // 发送POST请求
                $.ajax({
                    url: '/api/v1/signdco', // 目标URL
                    type: 'POST', // 请求类型为POST
                    contentType: 'application/json', // 设置内容类型为json
                    data: JSON.stringify({
                        name: data.field.name,
                        email: data.field.email
                    }), // 发送的数据需要转换为JSON字符串
                    processData: false, // 不处理发送的数据，使其保持为JSON字符串
                    success: function(res){
                        // 请求成功后的回调函数
                        console.log(res);
                        layer.msg('签署成功', {
                            icon: 1, // 图标类型，1表示成功图标
                            time: 2000 // 消息框显示的时间，单位为毫秒
                        },function(){
                            // 消息框关闭后的回调
                            window.location.href = '/static/dco/sign.html'; // 跳转到目标页面
                        });

                    },
                    error: function(err){
                        // 请求失败后的回调函数
                        console.error(err);
                        layer.msg('请求失败', {
                            icon: 2, // 图标类型，1表示成功图标
                            time: 2000 // 消息框显示的时间，单位为毫秒
                        })
                    }
                });
                // 这里可以添加提交表单的具体逻辑
                return false; // 阻止表单跳转
            });
        });
    </script>
</body>
</html>
